package com.tinyspring.factory;

/**
 * @author: TianYuan
 * @description: Bean工厂接口
 * @version: 1.0
 */
public interface BeanFactory {

    /**
     * 根据名称获取bean
     * @param name
     * @return
     */
    Object getBean(String name);

    /**
     * 根据类型获取bean
     * @param requiredType
     * @return
     * @param <T>
     */
    <T> T getBean(Class<T> requiredType);

    /**
     * 判断bean是否存在
     * @param name
     * @return
     */
    boolean containsBean(String name);

}
